1. Field of the Invention
The invention relates to buffering audio data within a multimedia receiver, and more particularly, to a first-in-first-out (FIFO) buffer architecture and related method of audio data buffering for use in a multimedia receiver.
2. Description of the Prior Art
FIG. 1 shows a typical multimedia receiver 100 being coupled to a plurality of audio and visual devices 102. Each of the audio and visual devices 102 acts as an input source to the multimedia receiver 100 and allows for a variety of different media types or programming content sources to be inputted into the multimedia receiver 100.
FIG. 2 shows a block diagram of a multimedia receiver 200 according to the related art. In order to process an incoming video signal VIN, the multimedia receiver 200 includes a video processing unit 202. An incoming audio signal AIN is coupled to an audio processing unit 204. Typically the video processing unit 202 requires more processing time than the audio processing unit 204. Therefore, the multimedia receiver 200 further includes an audio first-in-first-out (FIFO) buffer 206 to perform audio synchronization. The FIFO buffer 206 adds an appropriate delay to left and right audio channels in order to synchronize the outputted audio signals Left, Right with the outputted video signal Video. For example, the audio synchronization performed by the FIFO buffer 206 ensures a person's voice is heard at that exact time that the person's mouth moves in a scene of the outputted video.
FIG. 3 shows an example of a video frame within the incoming video signal VIN. The video frame includes three data periods: video data period, a control period, and a data island period. The data island period is for transmitting the audio data and other auxiliary data. Since the audio data can only be transmitted during the blanking area, the audio data for the whole frame must be accumulated during the blanking area, hence the audio data tends to be “bursty” in nature. In this situation, the FIFO buffer 206 of FIG. 2 will also perform rate matching between the incoming audio rate and the different outgoing audio rate. For example, the irregular incoming audio rate can be smoothed into a steady outgoing audio rate to prevent overflow and underflow situations from occurring.
As shown in FIG. 2, the FIFO buffer 206 is organized in two channels: a left channel comprising 100 cells, and a right channel also comprising 100 cells. The audio processing unit 204 typically receives a serial stream of bits in the incoming audio signal AIN and outputs parallel data words for both the left and right channels, which are then input into the respective channel of the FIFO buffer 206. Each time a new data word is outputted by audio processing unit 204, the respective channel of the FIFO buffer 206 is shifted to the right by one word. In this way, the first audio data words inputted into a channel of the FIFO buffer 206 are also the first audio data words to be later outputted by that channel of the FIFO buffer 206.
However, due to interference, erroneous data, noise, or other detrimental causes, sometimes there will be errors in the data of the incoming audio signal AIN. In this situation, the audio processing unit 204 will not be able to properly output a corresponding audio data word. For example, FIG. 2 shows a situation where the third data word in the right channel to the forty-fourth data word in the right channel are lost due to errors. That is, the right channel of the FIFO buffer 206 contains the first and second data words R1 and R2 as expected; however, the third cell of the right channel skips to the forty-fifth data word R45. This is because data words R3 to R44 were in error and were therefore not outputted by the audio processing unit 204.
In this situation, due to the missing data words R3 to R44, when the outputted right channel audio signal Right is played back on an attached speaker, a distorted noise will be apparent to a user of the multimedia receiver 200. For example, a very loud popping noise or clicking sound may occur. This audio playback distortion is caused because audio samples formed by the data words R3 to R44 are missing and therefore there is not a smooth transition between audio samples sent to the speaker. The resulting playback distortion is very noticeable and annoying to the user, and an improved method of performing audio synchronization and rate matching that prevents distortion of the outputted audio signal would be beneficial.